From c5a0216f1e0e81df7eccf475231ed117db140f8a Mon Sep 17 00:00:00 2001 From: Debian LibreOffice Maintainers Date: Mon, 27 Aug 2012 16:47:58 +0000 Subject: [PATCH] make-pyuno-work-with-system-wide-module-install Gbp-Pq: Name make-pyuno-work-with-system-wide-module-install.diff --- desktop/scripts/soffice.sh | 3 +++ pyuno/source/module/uno.py | 4 ++++ scripting/source/pyprov/officehelper.py | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh index 97a2be913f1..23ef132ef65 100755 --- a/desktop/scripts/soffice.sh +++ b/desktop/scripts/soffice.sh @@ -129,6 +129,9 @@ if echo "$checks" | grep -q "cc" ; then exit 1; fi +PYTHONPATH=$sd_prog${PYTHONPATH+:$PYTHONPATH} +export PYTHONPATH + case "`uname -s`" in NetBSD|OpenBSD|FreeBSD|DragonFly) # this is a temporary hack until we can live with the default search paths diff --git a/pyuno/source/module/uno.py b/pyuno/source/module/uno.py index e82d2fee0cb..9b1e3616449 100644 --- a/pyuno/source/module/uno.py +++ b/pyuno/source/module/uno.py @@ -26,8 +26,12 @@ # for a copy of the LGPLv3 License. # #************************************************************************* +import os import sys +sys.path.append('/usr/lib/libreoffice/program') +if getattr(os.environ, 'URE_BOOTSTRAP', None) is None: + os.environ['URE_BOOTSTRAP'] = "vnd.sun.star.pathname:/usr/lib/libreoffice/program/fundamentalrc" import pyuno try: diff --git a/scripting/source/pyprov/officehelper.py b/scripting/source/pyprov/officehelper.py index 84b7cce955a..3b6628921a7 100755 --- a/scripting/source/pyprov/officehelper.py +++ b/scripting/source/pyprov/officehelper.py @@ -53,7 +53,7 @@ def bootstrap(): if "UNO_PATH" in os.environ: sOffice = os.environ["UNO_PATH"] else: - sOffice = "" # lets hope for the best + sOffice = "/usr/lib/libreoffice/program" sOffice = os.path.join(sOffice, "soffice") if platform.startswith("win"): sOffice += ".exe" -- 2.30.2